package com.guli.generator.controller;

import com.guli.generator.pojo.EduCourse;
import com.guli.generator.pojo.vo.CourseInfoVo;
import com.guli.generator.service.EduCourseService;
import com.gulicom.R;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/eduserivce/course")
@CrossOrigin
public class EduCourseController {
    @Resource
    private EduCourseService eduCourseService;
    @PostMapping("/addCourse")
    public R addCourse(@RequestBody CourseInfoVo courseInfoVo){
        Integer integer = eduCourseService.addCourse(courseInfoVo);
        if(integer>1){
            return R.ok();
        }
        return R.error();
    }
}
